<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#canvas{
				border: 1px solid #aaa;
			}
		</style>
	</head>
	<canvas id="canvas" width="800" height="800">
	 	
	 	
	 	
	 </canvas>

	<body>
		<script type="text/javascript">
			var array=new Array(50,1,99,89,44,55)
			var n=0 ;
			
			var cnavas=document.getElementById("canvas")
			var ctx=cnavas.getContext("2d")
			ctx.fillStyle="red"
			ctx.beginPath()
			ctx.moveTo(0,0)
			
		
		for (var i=0;i<array.length;i++) {
			   n=n+10;
			   ctx.lineTo(n,array[i])
							}
			ctx.stroke()
			
		</script>
	</body>

</html>